package maze.view;

import org.lwjgl.opengl.GL11;

public class SpriteManager
{
	public CellSprite cellSprite;
	public TargetSprite targetSprite;
	public SunSprite sunSprite;

	private static SpriteManager instance = null;

	/**
	 * @return the scene instance
	 */
	public static SpriteManager getInstance()
	{
		if (instance == null)
			instance = new SpriteManager();
		return instance;
	}

	private SpriteManager()
	{
		cellSprite = new CellSprite();
		targetSprite = new TargetSprite();
		sunSprite = new SunSprite();
	}

	/** render all the sprites */
	public void render()
	{
		// clear the screen
		GL11.glClear(GL11.GL_COLOR_BUFFER_BIT | GL11.GL_STENCIL_BUFFER_BIT);

		// render all the sprites
		cellSprite.render();
		targetSprite.render();
		sunSprite.render();
	}
}
